ci(release): fix dashmate deb pack by configuring oclif targets#3713
Conversation
`oclif pack deb` has no `--targets` flag, so passing it aborts the deb release job with "Nonexistent flag: --targets". Move the linux target selection to `oclif.update.node.targets` in package.json, which the deb (and macos) pack commands read, and drop the `--targets` flag from the deb case. tarballs/win keep their `--targets` overrides since those commands support the flag. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe PR updates Node.js build target configuration for the dashmate CLI. ChangesNode.js Target Platform Configuration
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~4 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
thepastaclaw
left a comment
There was a problem hiding this comment.
Code Review
Small, well-scoped CI fix that removes the unsupported --targets flag from oclif pack deb and moves linux target selection to oclif.update.node.targets in dashmate's package.json. The change is correct: oclif pack deb reads targets from package.json, while tarballs/win still use the supported --targets CLI override. No blocking issues found; two minor nitpicks worth noting.
_Note: Inline posting through review_poster.py failed ( _gh(
File "/Users/claw/.openclaw/workspace/scripts/review_poster.py", line 23, in gh
raise RuntimeError(f"gh {' '.join(args)} failed: {result.stderr.strip()}")
RuntimeError: gh api /repos/dashpay/platform/pulls/3713/reviews --method POST --input - failed: gh: Unprocessable Entity (HTTP 422)
), so I posted the same verified findings as a top-level review body.
💬 2 nitpick(s)
2 finding(s)
nitpick: `oclif.update.node.targets` also drives the auto-update target list
packages/dashmate/package.json (line 131)
oclif.update.node.targets is consumed by oclif pack deb and oclif pack macos, but it is also the canonical list used by oclif's auto-update mechanism (channel manifests via oclif upload). After this change the auto-update list is fixed to linux-x64, linux-arm64, win32-x64, darwin-x64, darwin-arm64, which means existing 32-bit installs (linux-armv7l, win32-x86) will silently stop receiving updates. This matches the intent of #3709 (32-bit targets are unsupported on Node 24+), but it should be called out in release notes if any 32-bit dashmate users still rely on auto-update.
nitpick: `win` hardcoded `--targets=win32-x64` duplicates package.json config
scripts/pack_dashmate.sh (line 29)
Now that oclif.update.node.targets includes only win32-x64 for Windows, the --targets=win32-x64 override for pack win is redundant — pack win would derive the same target from the package.json config. The override is harmless and documents intent at the call site, but the two sources of truth can drift if Windows targets are ever extended. Either drop the override or add a comment noting it must be kept in sync with oclif.update.node.targets.
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review. Verify each finding against the current code and only fix it if needed.
- [NITPICK] In `packages/dashmate/package.json`:131-141: `oclif.update.node.targets` also drives the auto-update target list
`oclif.update.node.targets` is consumed by `oclif pack deb` and `oclif pack macos`, but it is also the canonical list used by oclif's auto-update mechanism (channel manifests via `oclif upload`). After this change the auto-update list is fixed to `linux-x64, linux-arm64, win32-x64, darwin-x64, darwin-arm64`, which means existing 32-bit installs (`linux-armv7l`, `win32-x86`) will silently stop receiving updates. This matches the intent of #3709 (32-bit targets are unsupported on Node 24+), but it should be called out in release notes if any 32-bit dashmate users still rely on auto-update.
- [NITPICK] In `scripts/pack_dashmate.sh`:29-36: `win` hardcoded `--targets=win32-x64` duplicates package.json config
Now that `oclif.update.node.targets` includes only `win32-x64` for Windows, the `--targets=win32-x64` override for `pack win` is redundant — `pack win` would derive the same target from the package.json config. The override is harmless and documents intent at the call site, but the two sources of truth can drift if Windows targets are ever extended. Either drop the override or add a comment noting it must be kept in sync with `oclif.update.node.targets`.
Issue being fixed or feature implemented
The
Release Dashmate packages (deb, ubuntu-24.04)job fails at the Create package step with:PR #3709 added a
debcase toscripts/pack_dashmate.shthat passes--targets=linux-x64,linux-arm64tooclif pack deb. Unlikepack tarballsandpack win, theoclif pack debcommand (oclif@4.0.3) has no--targetsflag, so the command aborts and the deb release artifact is never produced. (The tarballs/win/macos jobs in the same run passed.)Example failing run: https://github.com/dashpay/platform/actions/runs/26183903035/job/77044083874
What was done?
--targetsflag from thedebcase inscripts/pack_dashmate.sh.oclif.update.node.targetsinpackages/dashmate/package.json, whichpack deb(andpack macos) read. The list islinux-x64,linux-arm64,win32-x64,darwin-x64,darwin-arm64— i.e. the 32-bitlinux-armv7landwin32-x86targets stay dropped (the goal of ci(release): drop 32-bit dashmate pack targets unsupported by Node 24 #3709, since Node 24+ does not publish 32-bit binaries andoclif pack404s on them).tarballsandwinkeep their command-line--targetsoverrides since those commands support the flag.How Has This Been Tested?
package.jsonis still valid JSON andpack_dashmate.shpassesbash -n.debmatrix job (which uniquely received--targets) failed;debderives its linux targets fromoclif.update.node.targets, andmacosderives darwin targets from the same config (unchanged behavior).Breaking Changes
None.
Checklist:
For repository code-owners and collaborators only
Summary by CodeRabbit